package com.richesup.common.oss.common;

/**
 * Created by 13120 on 2018-6-21.
 */
public class CodeMessage {
    private String code;
    private String message;
    // 按照模块定义CodeMsg

    public static CodeMessage SUCCESS = new CodeMessage("200","成功");
    // 通用异常

    public static CodeMessage SERVER_EXCEPTION = new CodeMessage("500100","服务端异常");
    public static CodeMessage PARAMETER_ISNULL = new CodeMessage("500101","缺少必填项");
    public static CodeMessage IMAGE_EXCEEDSLIMIT = new CodeMessage("500102","上传文件超出限制");


    public static CodeMessage IMAGE_UNKNOWNERROR = new CodeMessage("500999","未知错误");
    // 业务异常
    public static CodeMessage PERMISSION_DENIED = new CodeMessage("600100","权限不足");
    public static CodeMessage IMAGE_SAVE_FILE_EXCEPTION = new CodeMessage("600101","文件保存失败");
    public static CodeMessage IMAGE_SAVE_DATABASE_EXCEPTION = new CodeMessage("600102","文件存数据库失败");
    public static CodeMessage IMAGE_TYPEEXCEPTION = new CodeMessage("600103","图片类型错误");


    private CodeMessage(String retCode, String message) {
        this.code = retCode;
        this.message = message;
    }
    public String getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }
}
